// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import store from '@/store/store.js'
// 导入并挂载全局的分享方法
import share from '@/until/share.js'
Vue.mixin(share)
	import Utils from '@/until/new_utils.js';
	Vue.prototype.$Utils = Utils;
// 按需导入 $http 对象
import {
  $http
} from '@escook/request-miniprogram'
uni.$http = $http
$http.baseUrl = "https://shop.5211game.com"
Vue.config.productionTip = false
//请求拦截器
$http.beforeRequest = function(options) {
  uni.showLoading({
    title:"加载中...",
    mask:true
  })
}
//响应拦截器

$http.afterRequest = function(respones) {
   uni.hideLoading();
}
//封装弹框方法
uni.$showMsg = function(title = "数据请求失败", duration = 1500) {
  uni.showLoading({
    title,
    duration,
    icon: 'none'
  })
}
App.mpType = 'app'

const app = new Vue({
  ...App,
  store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
  createSSRApp
} from 'vue'
import App from './App.vue'

export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
